document.addEventListener("DOMContentLoaded", isrem, false);
window.addEventListener("resize", isrem, false);

function isrem() {
  var html = document.documentElement || document.body;
  var hWidth = html.getBoundingClientRect().width;
  if (hWidth > 750) {
    hWidth = 750;
  }
  html.style.fontSize = hWidth / 15 + "px"
}